package cn.qn;

import com.alibaba.dubbo.config.spring.context.annotation.DubboComponentScan;
import com.alibaba.dubbo.spring.boot.annotation.EnableDubboConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;

import java.util.TimeZone;
import java.util.concurrent.CountDownLatch;


@EnableCaching
@SpringBootApplication
@EnableDubboConfiguration
@DubboComponentScan(basePackages = "cn.qn.service.*")
public class ServiceApplication {
	/**使用jar方式打包的启动方式*/
	private static CountDownLatch countDownLatch = new CountDownLatch(1);

	public static void main(String[] args) throws InterruptedException {
		//启动时区配置
		TimeZone.setDefault(TimeZone.getTimeZone("Asia/Shanghai"));
		SpringApplication.run(ServiceApplication.class, args).registerShutdownHook();
		countDownLatch.await();
	}
}